<?php
include_once("header.php");
include_once("common/dbConnect.php");
$handle = db_connect();
if(!$handle){
    echo "Did not access to the database";
}
$ID=(int)$_GET["id"];
if($ID>0){
    $student_sql = "select * from Student where StudentID=".$ID;    //php中用.串联字符串
    $result = mysql_query($student_sql);
    $entity = mysql_fetch_array($result);
}
?>
<div class="container body-content">
    <h2>Details</h2>
    <div class="form-horizontal">
        <h4></h4>
        <hr />
        <dl class="dl-horizontal">
            <dt>Name</dt>
            <dd><?php echo $entity['StudentName'] ?></dd>
            <dt>Age</dt>
            <dd><?php echo $entity['StudentAge'] ?></dd>
            <dt>Tel</dt>
            <dd><?php echo $entity['StudentTel'] ?></dd>
        </dl>
    </div>
    <p>
        <a href="index.php" class="btn btn-default">Return</a>
    </p>
</div>

